import time

import streamlit as st

@st.cache_data(ttl=20)
def fetch_data(key=None):
    time.sleep(3)
    return {"APPl":"$230"}

t0 = time.time()
key_value = st.text_input("key")
st.write(fetch_data(key=key_value))
t1 = time.time()
st.write(f"Time taken: {t1 - t0} seconds")